local skel=fk.CreateSkill{
    name="jlspgod__zhanyue_targets",
}

Fk:loadTranslationTable{
    ["jlspgod__zhanyue_targets"]="斩月",
    [":jlspgod__zhanyue_targets"]=[[斩月：你可以令至多两名与其相连的其他角色也成为目标。]],
    ["#jlspgod__zhanyue_targets-prompt"]="斩月：你可以令至多两名与其相连的其他角色也成为目标。",
}

skel:addEffect("active", {
  anim_type = "offensive",
  mute = true,
  card_num = 0,
  min_target_num = 0,
  max_target_num = 2,
  card_filter = Util.FalseFunc,
  prompt = "#jlspgod__zhanyue_targets-prompt",
  target_filter = function (self, player, to_select, selected)--要选择相邻角色
    local room=Fk:currentRoom()
    local about=room:getPlayerById(self.zhanyue_taregt)--相关目标
    local to_selects={}
    if not about then return false end
    if #selected == 0 then--
        local last=about:getNextAlive()
        if last and last~=player then
            table.insert(to_selects, last)
        end
        local next=about:getLastAlive()
        if next and next~=player then
            table.insert(to_selects, next)
        end
    elseif #selected == 1 then
        local old_last=about:getNextAlive()
        if old_last and old_last~=player then
            table.insertIfNeed(to_selects, old_last)
        end
        local old_next=about:getLastAlive()
        if old_next and old_next~=player then
            table.insertIfNeed(to_selects, old_next)
        end
        local new_last=selected[1]:getNextAlive()
        if new_last and new_last~=player and new_last~=about then
            table.insertIfNeed(to_selects, new_last)
        end
        local new_next=selected[1]:getLastAlive()
        if new_next and new_next~=player and new_next~=about then
            table.insertIfNeed(to_selects, new_next)
        end
    else
        return false
        
    end
    return table.contains(to_selects, to_select)
  end,
})





return skel